<?php
class Useradmin_Controller_Useradmin {
	
	public $template;
	
	public function main(array $getVars, array $postVars){
		try {
			if(isset($_SESSION['users_access_level']) && ($_SESSION['users_access_level'] > 5)){
				$userAdminModel = new Useradmin_Model_Useradmin;
				$article = $userAdminModel->manageActions($getVars, $postVars);
				$this->template = $article['template'];
				$view = new Core_Model_View($this->template);
			}
			else {
				echo '<meta http-equiv="Refresh" content="0;url='.SERVER_ROOT.'?manageaccount">';
			}
			$view->assign('article', $article);
		}
		catch(Exception $e){
			echo $e->getMessage();
		}
	}
	
}